Less_Parser: Support comma-separated selector lists in pseudo-classes - #1
Open
elabx wants to merge 1 commit into
Open
Less_Parser: Support comma-separated selector lists in pseudo-classes#1elabx wants to merge 1 commit into
elabx wants to merge 1 commit into
Conversation
elabx
force-pushed
the
fix-nested-pseudo-selectors
branch
2 times, most recently
from
March 3, 2026 18:43
c13eae4 to
6268ad9
Compare
Pseudo-classes like :is(), :not(), :where(), and :has() accept comma-separated selector lists per CSS Selectors Level 4. The parser's parenthesized-selector fallback in parseElement() previously called parseSelector() which stops at commas, causing a parse error for inputs like :is(.a, .b). Add a comma loop in the paren fallback to collect multiple selectors, wrapping them in an Expression node inside the Paren node. This mirrors the upstream Less.js 4.2 fix (less.js#4290). Bug: wikimedia#136 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
elabx
force-pushed
the
fix-nested-pseudo-selectors
branch
from
March 3, 2026 18:54
6268ad9 to
fac57db
Compare
BernhardBaumrock
added a commit
to baumrock/Less
that referenced
this pull request
Jul 9, 2026
Backport :is()/:not()/:where()/:has() comma-separated selector parsing from elabx/less.php#1, and native CSS color function passthrough for rgba(..., var(...)) from wikimedia/less.php 5.5.0 (T405815). Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
:is(),:not(),:where(),:has()) with comma-separated selector listsparseElement()'s parenthesized-selector fallback, wrapping multiple selectors in anExpressionnodeBug: wikimedia#136
Test plan
pseudo-selector-listcovers:is(),:not(),:where(),:has(), and nested combinations🤖 Generated with Claude Code